<p id="notice"><%= notice %></p>
<%= link_to '新增分类', new_subcategory_path %>
<%= link_to '返回', admin_path %>
<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Category</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @subcategories.each do |subcategory| %>
      <tr>
        <td><%= subcategory.name %></td>
        <td><%= subcategory.category.name %></td>
        <td><%= link_to 'Edit', edit_subcategory_path(subcategory) %></td>
        <td><%= link_to 'Destroy', subcategory, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>


